﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="StandardNemoBlogModule.ascx.cs" Inherits="blackhouse.NemoBlog.Web.StandardNemoBlogModule" %>
<%@ Register Namespace="blackhouse.WebNemo.Web.Controls" Assembly="blackhouse.WebNemo.Web" TagPrefix="blackhouse" %>
<%@ Register Src="~/Events/BlogDataFilter.ascx" TagPrefix="blackhouse" TagName="BlogDataFilter" %>

<%@ Import Namespace="blackhouse.NemoBlog.Web" %>
<%@ Import Namespace="blackhouse.StareKino.Web.Events" %>
<div itemscope itemtype="http://schema.org/Blog">
    <asp:Panel runat="server" ID="pnlNemoBlog">
        <div id="blogHeader" class="topBlueHeader<%=!String.IsNullOrEmpty(this.ltlBlogSecondName.Text)?" doubleLine":"" %>">
            <div class="hgroup">
                <h1>
                    <asp:Literal runat="server" ID="ltlBlogName"></asp:Literal>
                </h1>
                <asp:Literal runat="server" ID="ltlBlogSecondName"></asp:Literal>
            </div>

            <blackhouse:BlogDataFilter runat="server" id="BlogDataFilter" />


            <div class="cleaner"></div>
        </div>
        <asp:Panel runat="server" ID="pnlActionPanel" Visible="false">
            <ul class="nemoblogadminmenu">
                <li>
                    <blackhouse:LinkToEdit ID="lteSettings" runat="server" GroupSysName="BLOG_SETTINGS" Text="Ustawienia" />
                </li>
                <li>
                    <blackhouse:LinkToEdit ID="lteAddPost" runat="server" GroupSysName="BLOG_POSTS" RecordId="0" OpenAsPopup="false" Text="Dodaj nowy post" />
                </li>
            </ul>
            <div class="cleaner"></div>
        </asp:Panel>
        <asp:Repeater runat="server" ID="rptPosts">
            <HeaderTemplate>
                <section id="nemoBlog" class="nemoPostLists" itemscope itemprop="blogPosts" itemtype="http://schema.org/BlogPosting">
            </HeaderTemplate>
            <ItemTemplate>
                <article data-postid="<%#Eval("Post.PostId") %>">
                    <header>
                        <h1><a href="<%#Eval("WellFormedUrl") %>" title="<%#Eval("Post.Title") %>" itemprop="name"><%#Eval("Post.Title") %></a></h1>
                        <h3>
                            <%#(Container.DataItem as DTNemoBlogPost).GetEventDate().ToString("D") %>
                            <%#(Container.DataItem as DTNemoBlogPost).HaveLocation()?(", "+(Container.DataItem as DTNemoBlogPost).GetLocation().LocationName):String.Empty %>
                        </h3>
                    </header>
                    <span style="display: none" itemprop="dateCreated" datetime="<%#Eval("IsoPublishedDate") %>"><%#((Container.DataItem as DTNemoBlogPost).Post.IsPublished)? Eval("Post.PublishDate","{0:D}"):"***nie opublikowano***" %></span>
                    <asp:Repeater runat="server" ID="rptTags" DataSource='<%#Eval("Tags") %>' Visible='<%#(((int)Eval("Tags.Length"))>0) %>'>
                        <HeaderTemplate>
                            <ul class="nemoPostTags">
                        </HeaderTemplate>
                        <ItemTemplate>
                            <li><a href="<%#Eval("WellFormedUrl") %>" title="<%#Eval("Tag.Title") %>"><%#Eval("Tag.Name") %></a></li>
                        </ItemTemplate>
                        <FooterTemplate>
                            </ul>

                        </FooterTemplate>
                    </asp:Repeater>
                    <img src="<%#(Container.DataItem as DTNemoBlogPost).GetPhotoUrl() %>" alt="<%#Eval("Post.Title") %>" />
                    <p class="nemoPostLid" itemprop="description">
                        <%#Eval("Post.Lid") %> <a href="<%#Eval("WellFormedUrl") %>" title="<%#Eval("Post.Title") %>" class="nemoPostSeeMore" itemprop="url">czytaj więcej</a>
                    </p>
                    <div class="cleaner"></div>
                </article>
            </ItemTemplate>
            <FooterTemplate></section></FooterTemplate>
        </asp:Repeater>
        <asp:HyperLink runat="server" ID="seeMoreLink" CssClass="nemoSeeMorePosts" Text="<%$ Resources:Blog, seeMore %>" />
        <div class="cleaner"></div>
        <asp:Panel runat="server" ID="pnlNoPostsFind" CssClass="nemoNoPosts brownContent">
            <p class="beek">Brak wiadomości do wyświetlenia</p>
        <asp:Panel runat="server" ID="pnlAdminAddLink">
            ... ale to jest dobry czas, aby
                <blackhouse:LinkToEdit ID="lteAddPostOnNoContent" runat="server" GroupSysName="BLOG_POSTS" Text="dodać nowy post" OpenAsPopup="false" />
        </asp:Panel>
        </asp:Panel>
    </asp:Panel>
</div>
